package com.csap.framework.apidoc.admin.web;

import com.csap.framework.annotation.apidoc.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import com.csap.framework.annotation.apidoc.Description;
import org.springframework.web.bind.annotation.RestController;
import com.csap.framework.apidoc.admin.model.ApiDocUserModel;
import com.csap.framework.annotation.ResponseAdvice;
import com.csap.framework.annotation.apidoc.Api;
import com.csap.mybatisplus.extension.service.web.BaseController;
import com.csap.framework.apidoc.admin.entity.ApiDocUserEntity;
import com.csap.framework.apidoc.admin.service.ApiDocUserService;

/**
 * <p>
 * 用户信息
 * </p>
 *
 * @author
 * @dateTime
 */
@RequestMapping(value = "/api/apiDocUser")
@ResponseAdvice
@Api(description = "用户信息", value = "用户信息")
@RestController
@Description(value = "用户信息Controller")
public class ApiDocUserController extends BaseController<ApiDocUserService, ApiDocUserEntity, ApiDocUserModel, Long> {


    @ApiOperation(value = "登录")
    @PostMapping("login")
    public ApiDocUserModel login(@RequestBody ApiDocUserModel apiDocUserModel) {
        return getService().login(apiDocUserModel);
    }

    @ApiOperation(value = "退出登录")
    @PostMapping("loginOut")
    public Boolean loginOut() {
        return Boolean.TRUE;
    }
}
